<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ include file="../Include/Config.jsp"%>
<html>
  <head>
    <title>Web Ram Program</title>
    <meta http-equiv="Content-Type" content="text/jsp; charset=utf-8">
    <link href="ram/style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
    <script type="text/javascript">
      $(function(){

      	<logic:messagesPresent message="true">
  	      <html:messages message="true" id="msg">
  	        var msgs = '<bean:write name="msg" />'; 
	            msgs = msgs.replace(/\?/g, '');
	            msgs = msgs.replace(/en_US./g, '');
	            msgs = msgs.replace(/ko_KR./g, '');
             if(msgs.search("성공") > 0){
          	    alert(msgs);
                location.href="project.do?proId=${sessionScope.unitIDInSession}";
             }
  	      </html:messages>
        </logic:messagesPresent>
                
          $("#updateImg").css("cursor", "pointer").click(function(){
              
              var proName = $("#proName").val();
              if(proName == "" || proName == undefined ){
                  alert("프로젝트 명을 입력하세요");
                  $("#proName").focus();
                  return false;
               }
             
            var proRegdate = $("#proRegdate").val();
            if(proRegdate == "" || proRegdate == undefined ){
                alert("프로젝트 시작날짜를 입력하세요");
                $("#proRegdate").focus();
                return false;
             }

			  var proJob = $("#proJob").val();
              if(proJob == "" || proJob == undefined ){
                  alert("직업을 입력해 주세요.");
                  $("#proJob").focus();
                  return false;
               }            
              var proClient = $("#proClient").val();
              if(proClient == "" || proClient == undefined ){
                  alert("고객사를 입력해 주세요.");
                  $("#proClient").focus();
                  return false;
               }            
              var proContact = $("#proContact").val();
              if(proContact == "" || proContact == undefined ){
                  alert("담당자를 입력해 주세요.");
                  $("#proContact").focus();
                  return false;
               }
              var proOriginator = $("#proOriginator").val();
              if(proOriginator == "" || proOriginator == undefined ){
                  alert("발기인을 입력해 주세요.");
                  $("#proOriginator").focus();
                  return false;
               }
              var proCheckBy = $("#proCheckBy").val();
              if(proCheckBy == "" || proCheckBy == undefined ){
                  alert("선택을 입력해 주세요.");
                  $("#proCheckBy").focus();
                  return false;
               } 

              if(confirm("저장하시겠습니까?")){
                  $("input[name=method]").val("update");
                  $("form")[0].submit();
              }              
          });
          $("#listImg").css("cursor", "pointer").click(function(){
              location.href = "project.do?proId=${param.proId}";
          });

          $("#deleteImg").css("cursor","pointer").click(function(){
        	  if(confirm("삭제하시겠습니까?")){
                $("input[name=method]").val("delete");
                $("form")[0].submit();
        	  }
          });
      });
    </script>
    <link type="text/css" href="js/day/ui.all.css" rel="stylesheet" />
    <script type="text/javascript" src='js/day/jquery-1.3.2.js'></script>
    <script type="text/javascript" src='js/day/ui.core.js'></script>
    <script type="text/javascript" src='js/day/ui.datepicker.js'></script>
    <script type="text/javascript">
		$(function() {
			$.datepicker.setDefaults({
			    monthNames: ['년 1월','년 2월','년 3월','년 4월','년 5월','년 6월','년 7월','년 8월','년 9월','년 10월','년 11월','년 12월'],
			    dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
			    showMonthAfterYear:true,
			    dateFormat: 'yy-mm-dd',
			    showOn: 'both',
			    buttonImage: 'img/day/date_jquery.gif',
			    buttonImageOnly: true
			});
			$("#proRegdate").datepicker({
			    buttonText: '시작일'
			});
		});
function commonWork() {
	var stdt = document.getElementById("proRegdate");
}
</script>
  </head>
  <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <html:form action="project-submit.do" method="post">
    <input type="hidden" name="proUid" value="${param.proUid}" />
    <input type="hidden" name="method" value="" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td height="60">
          <!----- header ----------->
          <%@ include file="../Include/Header.jsp"%>
          <!----- header end ----------->
        </td>
      </tr>
      <tr>
        <td>
          <div align="left">
            <table width="1251" border="0" cellpadding="0" cellspacing="0">
              <tr valign="top">
                <td width="180" height="473">
                  <%@ include file="../Include/Project_Left.jsp"%>
                </td>
                <td width="20">&nbsp;</td>
                  <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>
                          <!------<table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="30" align="center" bgcolor="#333333">
<font color="#FFFFFF">
  <strong>
    Project 상세보기
  </strong>
</font>
                              </td>
                            </tr>
                            <tr>
                              <td height="1" bgcolor="f44901"></td>
                            </tr>
                            <tr>
                              <td bgcolor="#f4f4f4">
<table width="100%" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="22">ㆍProject 상세보기 페이지 입니다.</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
                              </td>
                            </tr>
                          </table>---->
                        <img src="ram/images/project-view.jpg"></td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                             
                              <td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30">
      <font color="ff3300">
        <b>
  기본정보
        </b>
      </font>
    </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#DDDDDD">
            <table width="100%" border="0" cellspacing="1" cellpadding="5" align="center">
<tr>
  <td width="768" height="30" bgcolor="#f4f4f4" colspan="2">
    <p>
      <strong>
        Overview
      </strong>
    </p>
  </td>
</tr>
<tr>
  <td height="30" bgcolor="#f4f4f4" width="164">
    Project name
  </td>
  <td height="30" bgcolor="#FFFFFF" width="593">
    <p>
      <html:text styleId="proName" name="projectData" property="proName" styleClass="grayform" size="36"  />
    </p>
  </td>
</tr>

 <tr>
<td height="30" bgcolor="#f4f4f4" width="164">Reg date</td>
<td height="30" bgcolor="#FFFFFF" width="593">
  <p><html:text styleId="proRegdate" name="projectData" property="proRegdate"  onchange="commonWork()" styleClass="grayform" size="10" />
  <font color="408EA8">*</font></p>
</td>
</tr>													   
													   
											  
											  
											  
											  
											  <tr>
  <td height="30" bgcolor="#f4f4f4" width="164">Job</td>
  <td width="593" height="30" bgcolor="#FFFFFF">
    <p>
      <html:text styleId="proJob" name="projectData" property="proJob" styleClass="grayform" size="36" />
      <font color="408EA8">*</font>
    </p>
  </td>
</tr>
<tr>
  <td height="30" bgcolor="#f4f4f4" width="164">Clinet</td>
  <td height="14" bgcolor="#FFFFFF" width="593">
    <p>
      <html:text styleId="proClient" name="projectData" property="proClient" styleClass="grayform" size="36" /><font color="408EA8">*</font> 
    </p>
  </td>
</tr>
<tr>
  <td height="30" bgcolor="#f4f4f4" width="164">Contact</td>
  <td height="15" bgcolor="#FFFFFF" width="593">
    <p>
      <html:text styleId="proContact" name="projectData" property="proContact" styleClass="grayform" size="36" /><font color="408EA8">*</font>
    </p>
  </td>
</tr>
<tr>
  <td height="30" bgcolor="#F4F4F4" width="164">Note</td>
  <td height="15" bgcolor="white" width="593">
    <p>
      <html:text styleId="proNote" name="projectData" property="proNote" styleClass="grayform" size="36" /> 
    </p>
  </td>
</tr>
<tr>
  <td height="30" bgcolor="#F4F4F4" width="768" colspan="2"><b>Quality Assurance</b></td>
</tr>
<tr>
  <td height="30" bgcolor="#F4F4F4" width="164">Originator</td>
  <td height="15" bgcolor="white" width="593">
    <p>
      <html:text styleId="proOriginator" name="projectData" property="proOriginator" styleClass="grayform" size="36" /><font color="408EA8">*</font> 
    </p>
  </td>
</tr>
<tr>
  <td height="30" bgcolor="#F4F4F4" width="164">Checked by</td>
  <td height="15" bgcolor="white" width="593">
    <p>
      <html:text styleId="proCheckBy" name="projectData" property="proCheckBy" styleClass="grayform" size="36" /> 
    </p>
  </td>
</tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height="50" align="center">
      <img id="updateImg" src="ram/images/btn_edit.jpg" border="0">
      <img id="listImg" src="ram/images/btn_list.jpg" border="0">
      <img id="deleteImg" src="ram/images/btn_delete.jpg" border="0">
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                    </table>
                    <p>&nbsp;</p>
                  </td>
                </tr>
              </table>
            </div>
          </td>
        </tr>
        <tr>
          <td align="center">
            <%@ include file="../Include/Foot.jsp"%>
    	  </td>
        </tr>
      </table>
      </html:form>
    </body>
</html>